package com.mine.androidlearn.api;

import com.google.gson.annotations.SerializedName;

/**
 *
 *
 * @author mine
 * @version V1.0 2018/8/6 22:34
 */
public class HttpResponse<T> {

    @SerializedName("error_code")
    private Integer code;
    @SerializedName("reason")
    private String msg;
    @SerializedName("result")
    private T data;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public T getData() {
        return data;
    }

    public boolean isSuccess() {
        return (HttpResponseCode.SUCCESS == 0);
    }
}
